package leetcode.code0581;

import leetcode.IDebug;
import leetcode.helper.HelpDebug;

public abstract class Solution581 implements IDebug {

	public abstract int findUnsortedSubarray(int[] nums);

	@Override
	public void debug1() {
		String str = "[2,6,4,8,10,9,15]";
		int[] nums = HelpDebug.str2array3(str);
		int e = 5;
		int r = this.findUnsortedSubarray(nums);
		HelpDebug.compare(e, r);
	}

	@Override
	public void debug2() {
		String str = "[1,2,3,4]";
		int[] nums = HelpDebug.str2array3(str);
		int e = 0;
		int r = this.findUnsortedSubarray(nums);
		HelpDebug.compare(e, r);
	}

	@Override
	public void debug3() {
		String str = "[1]";
		int[] nums = HelpDebug.str2array3(str);
		int e = 0;
		int r = this.findUnsortedSubarray(nums);
		HelpDebug.compare(e, r);
	}

	@Override
	public void debug4() {
		String str = "[1,3,2,4]";
		int[] nums = HelpDebug.str2array3(str);
		int e = 2;
		int r = this.findUnsortedSubarray(nums);
		HelpDebug.compare(e, r);
	}

	public void debug5() {
		String str = "[5,4,3,2,1]";
		int[] nums = HelpDebug.str2array3(str);
		int e = 5;
		int r = this.findUnsortedSubarray(nums);
		HelpDebug.compare(e, r);
	}

	public void debug6() {
		String str = "[1,3,2,3,3]";
		int[] nums = HelpDebug.str2array3(str);
		int e = 2;
		int r = this.findUnsortedSubarray(nums);
		HelpDebug.compare(e, r);
	}

	public void debug7() {
		String str = "[1,3,2,2,2]";
		int[] nums = HelpDebug.str2array3(str);
		int e = 4;
		int r = this.findUnsortedSubarray(nums);
		HelpDebug.compare(e, r);
	}

	public void debug8() {
		String str = "[1,2,3,3,3]";
		int[] nums = HelpDebug.str2array3(str);
		int e = 0;
		int r = this.findUnsortedSubarray(nums);
		HelpDebug.compare(e, r);
	}

	public void debug9() {
		String str = "[2,3,3,2,4]";
		int[] nums = HelpDebug.str2array3(str);
		int e = 3;
		int r = this.findUnsortedSubarray(nums);
		HelpDebug.compare(e, r);
	}
	public void debug10() {
		String str = "[1,2,4,5,3]";
		int[] nums = HelpDebug.str2array3(str);
		int e = 3;
		int r = this.findUnsortedSubarray(nums);
		HelpDebug.compare(e, r);
	}

}
